<!DOCTYPE html>
<html lang="zh-cn">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title></title>
		<style>
			[v-cloak]{
				display: none;
			}
		</style>
		<script src="./src/vue.js"></script>
	</head>

	<body>
		<div id="app">
			{{message}}
			<p>{{reversMes}}</p>
			<p>{{reversMes}}</p>
			<p>{{reversMes}}</p>
			
			<ul>
				<li v-for="item in filterArr">{{item}}</li>
			</ul>

		</div>
		</div>
		<script>
			let data = [1,2,3,4,5,6,7,8];

			let vm = new Vue({
				el:'#app',
				data: {
					message: 'hello,vue',
					list: data
				},
				computed: {
					reversMes: function (){
						return this.message.split('').reverse().join('');	
					},
					filterArr (){
						return this.list.filter(item => item < 4)
					}
				}
			});


		</script>
	</body>
</html>